<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <div class="h"><a href="{:U('add')}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>新建站点</a>
      <form action="{:U('index')}" method="get" class="fr form-inline">
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="输入搜索关键词" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form></div>
     <div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
     
     
    
 <thead>
 <tr>
    <td align="center">ID</td>
    <td align="center">网站名称</td>
    
    
    
    
    
    <!--<td align="center">更新数据</td>-->
    
    <td align="center">备注</td>
    
    
    <td align="center">域名</td>
    <td align="center" width="200">管理人</td>
    <td align="center">首页风格</td>
    <td align="center">显示风格</td>
    <td align="center">创建时间</td>
    <td align="center">到期时间</td>
    <td align="center">状态</td>
    <td align="center">操作</td>
  </tr>
</thead>
<volist name="list" id="vo">
  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />{$vo.id}</td>
    <td><span class="ajaxText" tablename="Site" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span>
    
    
    
    <if condition="$vo['agent'] eq 1 && getAccessMenu($accessList, 'Admin', 'Site', 'setagent')">
      
      <p>平台余额：<span style="color:#f00; font-size:18px; font-weight:bold;">¥{$vo.balance}</span></p>
      </if>
      
    </td>
    
    
    
    <!--<td><iframe src="" style="" scrolling="no" height="20" width="120" frameborder="0" id="iframe{$vo.id}"></iframe><a href="javascript:void(0);" onClick="$('#iframe{$vo.id}').attr('src','http://sjtb.hk1.dg263.net/Admin/Public/syncData.html?siteid={$vo.id}');">更新</a></td>-->
    
    <td>{$vo.remark}</td> 
    
    <td>{$vo.domain}</td> 
    <td>
    
    <volist name="vo['userlist']" id="svo">
     <a href="{:U('User/edit', array('id' => $svo['id']))}" target="_blank">{$svo.nickname}</a> 、 
     </volist>

    
    
    
<a class="btn btn-success" style="float:right;" href="javascript:void(0);" onclick="mydialog.open('{:U('selectUser',array('id' => $vo['id']))}', {width: 800, height: 500,lock:true,title:'编辑用户'})">管理用户</a>
</td>
    <td align="center"><p><!--<a href="{:U('Pages/edit', array('id' => $vo['page_header_id'], 'siteid' => $vo['id']))}" target="_blank">{:getTemplateName($vo['page_header_id'])}</a> | --><a href="{:U('Pages/edit', array('id' => $vo['page_id'], 'siteid' => $vo['id']))}" target="_blank">{:getTemplateName($vo['page_id'])}</a><!-- | <a href="{:U('Pages/edit', array('id' => $vo['page_footer_id'], 'siteid' => $vo['id']))}" target="_blank">{:getTemplateName($vo['page_footer_id'])}</a>-->
 </p>
      </td>
    <td align="center">{$vo.templateName}[<a href="{:U('showTemplateList',array('siteid'=>$vo['id']))}">更换风格</a>]</td>
    <td align="center">{:date('Y-m-d',$vo['create_time'])}</td>
    <td align="center">{:date('Y-m-d',$vo['timeout'])}</td>
    <td align="center"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span><else/><span class="status0 status_btn" field="status,{$vo.id}"></span></eq></td>
    <td align="center">
    
<if condition="getAccessMenu($accessList, 'Admin', 'Site', 'renew')">
    <a onClick="mydialog.open('{:U('renew', array('id'=>$vo['id']))}', {width: 500, height: 300,lock:true,title:'产品续费'})" href="javascript:void(0);">续费</a>
    </if>
    <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'resetPages')">
    | <a target="_blank" href="{:U('resetPages', array('id'=>$vo['id']))}" onClick="return confirm('此操作将修复站点页面错误的数据，耗费较多资源，您确定要这样做吗？');">整理页面</a>
    </if>
    <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'copy')">
     | <a target="_blank" href="javascript:void(0);" onClick="mydialog.open('{:U('copy', array('id' => $vo['id']))}',{width: 500, height: 200,lock:false,title:'复制站点'});">复制</a>
     </if>
     <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'Conf')"> | 
    <a href="{:U('Conf',array('id'=>$vo['id']))}">站点设置</a>
    </if>
    <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'edit')">
     | <a href="{:U('edit',array('id'=>$vo['id']))}">绑定域名</a>
     </if>
     <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'delete')">
      | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');">删除</a>
      </if>
      
      <if condition="getAccessMenu($accessList, 'Admin', 'Site', 'setagent')">
      <if condition="$vo['agent'] eq 0">
      | <a href="{:U('setagent',array('id'=>$vo['id']))}" onclick="return confirm('确定要设置代理吗？');">设为代理</a>
     <else/>
     
      | <a href="{:U('setagent',array('id'=>$vo['id']))}" onclick="return confirm('确定要取消代理吗？');"><span style="color:#f00">取消代理</span></a>
      
      
      <if condition="getAccessMenu($accessList, 'Admin', 'Site_balance_log', 'index')">
      | <a href="{:U('Site_balance_log/index',array('id'=>$vo['id']))}" target="_blank">平台资金明细</a>
      </if>
      
      </if>
      </if>
      </td>
  </tr>
</volist>

</table>

<div class="pages">
        <div class="controlList fl"><a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a>
        
        
       </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>


</div>

  </div>
  <div class="clear"></div>
</div>


<include file="Public:footer" />